ostree-prepare-root: log informational messages to stdout
authorDaniel Drake <drake@endlessm.com>
Mon, 9 Mar 2015 18:20:18 +0000 (12:20 -0600)
committerColin Walters <walters@verbum.org>
Tue, 10 Mar 2015 01:26:13 +0000 (21:26 -0400)
ostree-prepare-root was logging normal, informational messages
to stderr which the systemd unit points to the console.

To achieve silent boot, log these ordinary messages to stdout only.

src/switchroot/ostree-prepare-root.c

index f24409f6695caa293ac017a59ee853414413c22d..bb9ba13eb1aefa5a7092dca11ccaf7f0d607646f 100644 (file)
@@ -147,7 +147,7 @@ main(int argc, char *argv[])
     }
 
   snprintf (destpath, sizeof(destpath), "%s/%s", root_mountpoint, ostree_target);
-  fprintf (stderr, "Examining %s\n", destpath);
+  printf ("Examining %s\n", destpath);
   if (lstat (destpath, &stbuf) < 0)
     {
       perrorv ("Couldn't find specified OSTree root '%s': ", destpath);
@@ -164,7 +164,7 @@ main(int argc, char *argv[])
       perrorv ("realpath(%s) failed: ", destpath);
       exit (EXIT_FAILURE);
     }
-  fprintf (stderr, "Resolved OSTree target to: %s\n", deploy_path);
+  printf ("Resolved OSTree target to: %s\n", deploy_path);
   
   /* Work-around for a kernel bug: for some reason the kernel
    * refuses switching root if any file systems are mounted